package com.party.core.model.mall;

import com.party.core.model.BaseModel;

import java.util.List;

/**
 * 商品规格
 * Created by wei.li
 *
 * @date 2017/8/15 0015
 * @time 14:58
 */
public class MallSpec extends BaseModel {

    //名称
    private String name;

    private List<MallSpecValue> specValues;

    public MallSpec() {
    }

    public MallSpec(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<MallSpecValue> getSpecValues() {
        return specValues;
    }

    public void setSpecValues(List<MallSpecValue> specValues) {
        this.specValues = specValues;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;

        MallSpec mallSpec = (MallSpec) o;

        return name != null ? name.equals(mallSpec.name) : mallSpec.name == null;

    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (name != null ? name.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "MallSpec{" +
                "name='" + name + '\'' +
                '}';
    }
}
